package cn.schoolwow.workflow.domain.deploy;

/**部署节点类型*/
public enum DeployNodeType {
    /**开始节点*/
    StartNode(0),
    /**审批节点*/
    AuditNode(1),
    /**结束节点*/
    EndNode(2),
    /**条件节点*/
    ConditionNode(3),
    /**自动通过节点*/
    PassNode(4),
    /**自动拒绝节点*/
    RejectNode(5),

    /**抄送节点*/
    CarbonCopyNode(10),

    /**并行网关*/
    ParallelGateway(20),

    /**排他网关*/
    ExclusiveGateway(21),

    /**包容网关*/
    InclusiveGateway(22);

    public int value;

    DeployNodeType(int value) {
        this.value = value;
    }

    public static DeployNodeType getDeployNodeType(int value){
        DeployNodeType[] deployNodeTypes = DeployNodeType.values();
        for(DeployNodeType deployNodeType:deployNodeTypes){
            if(deployNodeType.value==value){
                return deployNodeType;
            }
        }
        throw new IllegalArgumentException("节点类型不存在!节点类型值:"+value);
    }
}
